package com.myrpc.handler;

import com.myrpc.common.Res;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

/**
 * Created with IntelliJ IDEA.
 *
 * @Description:
 * @User: weiyi.liu
 * @Date: 2018-06-08
 * @Time: 22:02
 */
public class RpcClientHandler extends SimpleChannelInboundHandler<Res> {
	public Object obj = new Object();
	public Res res;

	protected void channelRead0(ChannelHandlerContext ctx, Res res) {
		synchronized (obj) {
			this.res = res;
			obj.notifyAll();
		}
	}
}
